package com.fifth.emp.service.impl;

import com.fifth.common.pojo.dto.CommonResult;
import com.fifth.common.pojo.entity.Location;
import com.fifth.emp.mapper.LocationMapper;
import com.fifth.emp.service.ILocationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 地区表 服务实现类
 * </p>
 *
 * @author 徐志豪
 * @since 2022-09-03
 */
@Service
public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> implements ILocationService {

    @Autowired
    private LocationMapper locationMapper;

    @Override
    public CommonResult getLocation() {
        List<Location> list = locationMapper.selectAll();
        return new CommonResult(2000,"查询区域成功",list);
    }
}
